<?php 
$show_validator = true;
include TMPL_PATH.'public/header.phtml';
?>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
        <a href='<?php echo U('product/product_size_list');?>' ><em>尺码对照表</em></a><span>|</span>
        <a href='javascript:;' class="on"><em><?php if(isset($product) && $product)echo'编辑';else echo'添加';?>尺码</em></a>
		</div>
</div>

<form name="myform" id="myform" action="__SELF__" method="post" enctype="multipart/form-data" onSubmit="return submit_size_check();">
<div class="pad-10">
<div class="col-tab">
<div id="div_setting_1" class="contentList pad-10">
<table width="100%" class="table_form ">		
      <tr>
        <th>身高：</th>
        <td><input type="text" name="height" id="height" class="input-text" value="<?php echo isset($size['height']) ? $size['height'] : null;?>"/>cm &nbsp;&nbsp;至&nbsp;&nbsp;<input type="text" name="height2" id="height2" class="input-text" value="<?php echo isset($size['height2']) ? $size['height2'] : null;?>"/>cm <span>&nbsp;&nbsp;列：170cm - 175cm</span></td>
      </tr>
      <tr>
        <th>体重：</th>
        <td><input type="text" name="weight" id="weight" class="input-text" value="<?php echo isset($size['weight']) ? $size['weight'] : null;?>"/>kg &nbsp;&nbsp;至&nbsp;&nbsp;<input type="text" name="weight2" id="weight2" class="input-text" value="<?php echo isset($size['weight2']) ? $size['weight2'] : null;?>"/>kg <span>&nbsp;&nbsp;列：60kg - 75kg</span></td>
      </tr>
      <tr>
        <th>年龄：</th>
        <td><input type="text" name="age" id="age" class="input-text" value="<?php echo isset($size['age']) ? $size['age'] : null;?>"/>&nbsp;&nbsp;至&nbsp;&nbsp;<input type="text" name="age2" class="input-text" id="age2" value="<?php echo isset($size['age2']) ? $size['age2'] : null;?>"/> <span>&nbsp;&nbsp;列：25 - 27</span></td>
      </tr>
      <tr>
        <th>胸围：</th>
        <td><input type="text" name="circumference" class="input-text" value="<?php echo isset($size['circumference']) ? $size['circumference'] : null;?>"/></td>
      </tr>
      <tr>
        <th>腰围：</th>
        <td><input type="text" name="waistline" class="input-text" value="<?php echo isset($size['waistline']) ? $size['waistline'] : null;?>"/></td>
      </tr>
      <tr>
        <th>臀围：</th>
        <td><input type="text" name="hipline" class="input-text" value="<?php echo isset($size['hipline']) ? $size['hipline'] : null;?>"/></td>
      </tr>
      <tr>
        <th>肩宽：</th>
        <td><input type="text" name="shoulder" class="input-text" value="<?php echo isset($size['shoulder']) ? $size['shoulder'] : null;?>"/></td>
      </tr>
      <tr>
        <th>前衣长：</th>
        <td><input type="text" name="forepart_length" class="input-text" value="<?php echo $size['forepart_length'] ? $size['forepart_length'] : null;?>"/></td>
      </tr>
	  <tr>
		 <th>袖长：</th>
		  <td><input type="text" name="outside_sleeve" class="input-text" value="<?php echo $size['outside_sleeve'] ? $size['outside_sleeve'] : null;?>"/></td>
    </tr>
	  
	  
</table>
</div>

</div>

 <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="提交" class="button">
</div>
</div>
</form>
</body>
</html>
<script type="text/javascript">
function submit_size_check() 
{
	var height 	= $('#height').val(); 
	var height2 = $('#height2').val(); 
	var weight 	= $('#weight').val(); 
	var weight2 = $('#weight2').val(); 
	var age 	= $('#age').val(); 
	var age2 	= $('#age2').val();
	if(height2 < height) {
		alert("请输入正确的身高！");
		$('#height2').focus();
		return false;
	}else if(weight2 < weight){
		alert("请输入正确的体重！");
		$('#weight2').focus();
		return false;
	}else if(age2 < age){
		alert("请输入正确的年龄！")
		$('#age2').focus();
		return false;
	}	
	return true;	
}
</script>

